<?php
	
	$_callback = $_REQUEST['callback'];
	$_action = $_REQUEST['act'];

	// init
	$result = TRUE;

	if (isset($_action))
	{
		switch ($_action) 
		{
			case 'l': /* login */
				
			break;
			default:
				$err = 'unknown \'act\' value: '.$_action;
				$result = FALSE;
			break;
		}
	}
	else
	{
		$err = 'undefined \'act\' value';
		$result = FALSE;
	}

	// enclosure
	echo $_callback.'('.json_encode(array(
			'result' => $result,
			'data' => $data,
			'err' => $err
		)).');';
?>
